//
// Box.cpp for bomberman in /home/lefebv_w//workspace/cpp/bomberman/googleCode/level
// 
// Made by damien lefebvre
// Login   <lefebv_w@epitech.net>
// 
// Started on  Sat May 11 17:31:48 2013 damien lefebvre
// Last update Mon May 27 20:13:54 2013 damien lefebvre
//

#include		"Box.hh"

Box::Box(Vector3f const & position, float size, t_TypeOfCase type, std::string const & tex)
  : m_status(EMPTY), m_type(type),
    m_position(position), m_size(size),
    m_texPath(tex), m_wall(false)
{}

Box::~Box(void)
{
  // delete m_model;
}

void			Box::initialize(void)
{
  if (m_type == TILL)
    m_model = new Till(m_position, m_size, m_texPath);
  else if (m_type == WALL)
    {
      m_wall = true;
      m_model = new Wall(m_position, m_size, m_texPath);
    }
  else
    m_model = new Floor(m_position, m_size, m_texPath);
  m_model->initialize();
}

void			Box::update(gdl::GameClock const & gameClock, gdl::Input & input)
{
  m_model->update(gameClock, input);
}

void			Box::draw(void)
{
  m_model->draw();
}
